// pages/attendance/attendanceDetail/attendanceDetail.js
const {
  globalData
} = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    userInfo: null,
    courseData: null,
    nowDate: null,
    formalClassName: null,
    courseData: null
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    options.attendanceSign && (options = wx.getStorageSync('attendCourse'))
    this.setData({
      userInfo: globalData.userInfo,
      nowDate: wx.getStorageSync('time'),
      formalClassName: options.formalClassName,
      courseData: {
        classBegin: options.begintime,
        classEnd: options.classEnd,
        courseName: options.formalClassName
      }
    })
    this.selectComponent('#countPage').getCountData(options)
  }
})